<!DOCTYPE html>
<html lang="zh" xmlns:th="http://www.thymeleaf.org">
<head>
    <th:block th:include="include :: header('修改项目管理')"/>
    <th:block th:include="include :: datetimepicker-css"/>
</head>
<body class="white-bg">
<div class="wrapper wrapper-content animated fadeInRight ibox-content">
    <form class="form-horizontal m" id="form-management-edit" th:object="${projectManagement}">
        <input name="id" th:field="*{id}" type="hidden">
        <input name="status" type="hidden" value="报告待审核">
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">审核意见：</label>
                <div class="col-sm-8">
                    <input class="form-control" name="bat" readonly th:field="*{bat}" type="text">
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">项目名称：</label>
                <div class="col-sm-8">
                    <input class="form-control" name="projectName" required th:field="*{projectName}" type="text">
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">项目编号：</label>
                <div class="col-sm-8">
                    <input class="form-control" name="projectCode" th:field="*{projectCode}" type="text">
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">预期工期：</label>
                <div class="col-sm-8">
                    <input class="form-control" name="expectedDuration" th:field="*{expectedDuration}" type="text">
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label">评估金额：</label>
                <div class="col-sm-8">
                    <input class="form-control" name="estimatedCost" th:field="*{estimatedCost}" type="text">
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">创建时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input class="form-control"
                               name="createdTime"
                               placeholder="yyyy-MM-dd" required
                               th:value="${#dates.format(projectManagement.createdTime, 'yyyy-MM-dd')}" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">更新时间：</label>
                <div class="col-sm-8">
                    <div class="input-group date">
                        <input class="form-control"
                               name="updatedTime"
                               placeholder="yyyy-MM-dd" required
                               th:value="${#dates.format(projectManagement.updatedTime, 'yyyy-MM-dd')}" type="text">
                        <span class="input-group-addon"><i class="fa fa-calendar"></i></span>
                    </div>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required">需求：</label>
                <div class="col-sm-8">
                    <textarea class="form-control" name="requirement" th:field="*{requirement}" type="text"></textarea>
                </div>
            </div>
        </div>
        <div class="col-xs-12">
            <div class="form-group">
                <label class="col-sm-3 control-label is-required" for="elementSelect">选择元素：</label>
                <div class="col-sm-8">
                    <select class="form-control" id="elementSelect">
                        <option value="科技">科技</option>
                        <option value="商务">商务</option>
                        <option value="教育">教育</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required" for="styleSelect">选择风格：</label>
                <div class="col-sm-8">
                    <select class="form-control" id="styleSelect">
                        <option value="现代">现代</option>
                        <option value="简约">简约</option>
                        <option value="复古">复古</option>
                    </select>
                </div>
            </div>
            <div class="form-group">
                <label class="col-sm-3 control-label is-required" for="templateSelect">选择模板：</label>
                <div class="col-sm-8">
                    <select class="form-control" id="templateSelect">
                        <option value="科技模板">科技模板</option>
                        <option value="商务模板">商务模板</option>
                        <option value="教育模板">教育模板</option>
                    </select>
                </div>
            </div>
        </div>
    </form>
</div>
<th:block th:include="include :: footer"/>
<th:block th:include="include :: datetimepicker-js"/>
<script th:inline="javascript">
    var prefix = ctx + "system/management";
    $("#form-management-edit").validate({
        focusCleanup: true
    });

    function submitHandler() {
        if ($.validate.form()) {
            $.operate.save(prefix + "/edit", $('#form-management-edit').serialize());
        }
    }

    $("input[name='createdTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });

    $("input[name='updatedTime']").datetimepicker({
        format: "yyyy-mm-dd",
        minView: "month",
        autoclose: true
    });
</script>
</body>
</html>
